package com.buddies.lottery.data;

import com.buddies.lottery.base.IView;

import io.reactivex.observers.DisposableObserver;

/**
 * Created by liuleigang on 2018/2/27.
 */

public abstract class BaseObserver<T> extends DisposableObserver<T> {
    private IView iView;

    public BaseObserver() {
    }

    public BaseObserver(IView view) {
        iView = view;
    }

    @Override
    public void onError(Throwable e) {
        if (iView != null) {
            iView.onError(e);
        }
    }

    @Override
    public void onComplete() {

    }
}
